using System;
using System.Collections.Generic;
using System.Text;

namespace AuthorizeNET {
	public class ElectronicCheckTransaction : TransactionDetails, INameValueSerializable {

		private string aba_code;
		private string account_name;
		private string account_number;
		private BankAccountType account_type;
		private string bank_name;
		private CheckTransactionType transaction_type;
		private string check_number;
		private bool is_recurring;

		public ElectronicCheckTransaction(double amount, string currency_code, string aba_code, string account_number, BankAccountType account_type, string bank_name, string account_name, CheckTransactionType transaction_type, string check_number, bool is_recurring) 
			: base(amount, currency_code, TransactionMethod.ElectronicCheck) {

			this.aba_code = aba_code;
			this.account_name = account_name;
			this.account_number = account_number;
			this.account_type = account_type;
			this.bank_name = bank_name;
			this.check_number = check_number;
			this.is_recurring = is_recurring;
			this.transaction_type = transaction_type;
		}

		[KeyName("x_recurring_billing")]
		public bool RecurringBilling {
			get { return (this.is_recurring); }
			set { this.is_recurring = value; }
		}

		[KeyName("x_bank_aba_code")]
		public string AbaCode {
			get { return (this.aba_code); }
			set { this.aba_code = value; }
		}

		[KeyName("x_bank_acct_code")]
		public string AccountNumber {
			get { return (this.account_number); }
			set { this.account_number = value; }
		}

		[KeyName("x_bank_acct_type")]
		public BankAccountType AccountType {
			get { return (this.account_type); }
			set { this.account_type = value; }
		}

		[KeyName("x_bank_name")]
		public string BankName {
			get { return (this.bank_name); }
			set { this.bank_name = value; }
		}

		[KeyName("x_bank_acct_name")]
		public string AccountName {
			get { return (this.account_name); }
			set { this.account_name = value; }
		}

		[KeyName("x_echeck_type")]
		public CheckTransactionType CheckType {
			get { return (this.transaction_type); }
			set { this.transaction_type = value; }
		}

		[KeyName("x_bank_check_number")]
		public string CheckNumber {
			get { return (this.check_number); }
			set { this.check_number = value; }
		}
	}
}
